package no21.thread;

public abstract class IntGenerator {
	//声明为不稳定的
	private volatile boolean canceled = false;
	public abstract int next();	
	//public abstract int next1();	
	public void cancel(){
		canceled = true;
	}
	
	public boolean iscanceled(){
		return canceled;
	}
}
